﻿<div>

<h2>JavaScript 代码：</h2>
<textarea name="dp-syntaxhighlighter" class="brush: js; highlight: [4]" >
    
    $(function () {
        var text = $("#Text1").validatebox({
            required: true,
            prompt: "请输入内容..."
        });

        $("#Button1").click(function () {
            text.validatebox("validate");
        });
    });

</textarea>
<h2>HTML 代码：</h2>
<textarea name="dp-syntaxhighlighter" class="brush: html; highlight: []" >
    
    <input id="Button1" type="button" value="刷新输入框的验证状态" />
    <input id="Text1" />

</textarea>


</div>